<?php
include("db/connect.php");
$sqlselectupdate="select * from product where pro_id='".$_POST["temp"]."'";
$queryselectupdate=mysql_query($sqlselectupdate);
$fetchselectupdate=mysql_fetch_array($queryselectupdate);
?>
<form id="fromInsert_Pro" name="fromInsert_Pro" method="post" action="Javascript:ajaxmanage(3,<?php echo $_POST["temp"]?>);">
  <p>ข้อมูลสินค้า</p>
  <table width="528" border="0">
    <tr>
      <td width="178">รหัสการสั่งซื้อสินค้า</td>
      <td width="340"><input type="text" name="pro_id" id="pro_id" readonly value="<?php echo $fetchselectupdate["pro_id"]?>"/></td>
    </tr>
    <tr>
      <td>ชื่อสินค้า</td>
      <td><input name="pro_name" type="text" required id="pro_name" maxlength="13" readonly value="<?php echo $fetchselectupdate["pro_name"]?>"/></td>
    </tr>
    <tr>
      <td>ราคา</td>
      <td><input name="pro_price" type="text" id="pro_price" value="<?php echo $fetchselectupdate["pro_price"]?>" /></td>
    </tr>
    <tr>
      <td>จำนวน</td>
       <td><input name="pro_price" type="text" id="pro_price" value="<?php echo $fetchselectupdate["pro_price"]?>" /></td>
    </tr>
    <tr>
      <td>วันที่สั่งซื้อ</td>
      <td><label for="textfield">
        <select name="select3">
          <option>วันที่</option>
        </select>
        <select name="select" id="select">
          <option>เดือน</option>
        </select>
        <select name="select2" id="select2">
          <option>ปี</option>
        </select>
      </label></td>
    </tr>
    <tr>
      <td>วันที่กำหนดส่งสินค้า</td>
      <td><label for="textfield">
        <select name="select3">
          <option>วันที่</option>
        </select>
        <select name="select" id="select">
          <option>เดือน</option>
        </select>
        <select name="select2" id="select2">
          <option>ปี</option>
        </select>
      </label></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="Submit" id="button" value="Submit" />
    <input type="reset" name="button2" id="button2" value="Reset" />
  </p>
  <p>&nbsp;</p>
</form>
<script>
function submitPro(){
	$.ajax({
			type:"POST",
			url:"insert_product2.php",
			data:$("#fromInsert_Pro").serialize(),
			success: function(msg){
				$("#spantest").html(msg);
				}
			});//ajax
	}
</script>
